package com.xinqi.modules.chat.chat.official.controller.inner;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.chat.chat.official.dto.req.ChatRemindContentBatchCreateDTO;
import com.xinqi.modules.chat.chat.official.dto.req.ChatRemindContentCreateDTO;
import com.xinqi.modules.chat.chat.official.service.impl.ChatRemindMQService;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/**
 * 接口 -- 新奇提醒消息记录
 *
 * @author: yyzhen
 * @date: 2023/05/06
 */
@Validated
@Hidden
@RestController
@RequestMapping("/inner/remind-content")
@RequiredArgsConstructor
public class ChatRemindContentInnerController {
    private final ChatRemindMQService chatRemindMQService;

    @Operation(summary = "新增 -- 新奇提醒消息记录")
    @PostMapping("/insert")
    public R<Boolean> insert(@Validated @RequestBody ChatRemindContentCreateDTO dto) {
        return R.data(chatRemindMQService.sendRemind(dto));
    }

    @Operation(summary = "批量新增 -- 新奇提醒消息记录")
    @PostMapping("/batchInsert")
    public R<Boolean> batchInsert(@Validated @RequestBody ChatRemindContentBatchCreateDTO dto) {
        return R.data(chatRemindMQService.batchSendRemind(dto));
    }

}
